/* OrderDetailPage 样式 */
.order-detail-layout {
  /* min-height: 100vh; */
  background: #f5f7fa;
}

.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-right .ant-btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.header-right .ant-btn:not(.ant-btn-primary):not(.ant-btn-dangerous) {
  border-color: #d1d5db;
}

.header-right .ant-btn:not(.ant-btn-primary):not(.ant-btn-dangerous):hover {
  border-color: #9ca3af;
  color: #111827;
}

.back-button {
  color: #6b7280 !important;
  border: none !important;
  padding: 8px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease;
  background: #f9fafb !important;
}

.back-button:hover {
  color: #374151 !important;
  background: #f3f4f6 !important;
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.025em;
}

.order-detail-content {
  padding: 20px 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* 加载和错误状态 */
.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

/* 卡片样式 */
.info-card,
.products-card,
.payment-card {
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.info-card .ant-card-head,
.products-card .ant-card-head,
.payment-card .ant-card-head {
  border-bottom: 1px solid #f3f4f6;
  background: #fafbfc;
}

.info-card .ant-card-head-title,
.products-card .ant-card-head-title,
.payment-card .ant-card-head-title {
  font-weight: 600;
  color: #374151;
}

/* 商品列表样式 */
.product-item {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.product-item:hover {
  background-color: #fafafa;
}

.product-item:last-child {
  border-bottom: none;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.quantity-info,
.amount-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.amount-info {
  align-items: flex-end;
  text-align: left;
}

.image-placeholder {
  width: 80px;
  height: 80px;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 24px;
}

/* 支付信息样式 */
.payment-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.payment-item.total {
  font-size: 16px;
  font-weight: 600;
  padding: 12px 0;
  border-top: 2px solid #e5e7eb;
  border-bottom: 2px solid #e5e7eb;
}

.payment-label {
  color: #6b7280;
  font-size: 14px;
}

.payment-value {
  font-weight: 500;
  color: #111827;
}

.payment-value.positive {
  color: #059669;
}

.payment-value.negative {
  color: #dc2626;
}

.payment-item.total .payment-label {
  font-size: 16px;
  color: #111827;
  font-weight: 600;
}

.payment-item.total .payment-value {
  font-size: 18px;
  color: #059669;
  font-weight: 700;
}

.payment-methods {
  margin-top: 8px;
}

.payment-methods .ant-typography-h5 {
  margin-bottom: 12px;
  color: #374151;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .order-detail-content .ant-col:first-child {
    margin-bottom: 24px;
  }
}

@media (max-width: 768px) {
  .order-detail-header {
    padding: 16px 20px;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .header-right {
    width: 100%;
    justify-content: flex-start;
  }
  
  .order-detail-content {
    padding: 16px 12px;
  }
  
  .page-title {
    font-size: 20px;
  }

  .product-item .ant-row {
    flex-direction: column;
    gap: 12px;
  }

  .product-item .ant-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .quantity-info,
  .amount-info {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* 订单商品操作样式 */
.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-actions .ant-btn {
  border-radius: 4px;
  font-size: 12px;
  height: 28px;
  padding: 0 8px;
}

.quantity-info .ant-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.quantity-info .ant-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.quantity-info .ant-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 价格修改模态框样式 */
.ant-modal .ant-form-item {
  margin-bottom: 16px;
}

.ant-modal .ant-form-item-label {
  padding-bottom: 4px;
}

.ant-modal .ant-form-item-label > label {
  font-weight: 500;
  color: #262626;
}

.ant-radio-group .ant-radio-wrapper {
  margin-right: 16px;
}

.ant-space-item .ant-btn {
  border-radius: 4px;
  font-size: 12px;
  height: 28px;
  padding: 0 12px;
  border-color: #d9d9d9;
}

.ant-space-item .ant-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

/* 价格预览区域样式 */
.price-preview {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 12px;
  margin-top: 16px;
}

.price-preview-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.price-preview-item:last-child {
  margin-bottom: 0;
  font-weight: bold;
  border-top: 1px solid #e8e8e8;
  padding-top: 8px;
}

/* 删除线价格样式 */
.original-price {
  text-decoration: line-through;
  color: #8c8c8c;
  font-size: 12px;
}

.discount-price {
  color: #ff4d4f;
  font-weight: 600;
}

.normal-price {
  color: #262626;
  font-weight: 500;
}

/* 调整金额显示样式 */
.adjust-amount {
  font-size: 11px;
  margin-top: 2px;
}

.adjust-amount.positive {
  color: #52c41a;
}

.adjust-amount.negative {
  color: #ff4d4f;
}

/* 价格信息样式 */
.price-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.price-info .ant-tag {
  margin: 0;
  font-size: 10px;
  padding: 1px 4px;
  line-height: 1.2;
}

/* 金额信息优化 */
.amount-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* 商品项布局优化 */
.product-item {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.product-item:hover {
  background-color: #fafafa;
}

.product-item:last-child {
  border-bottom: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .product-actions {
    flex-direction: column;
    gap: 4px;
  }
  
  .product-actions .ant-btn {
    font-size: 11px;
    height: 24px;
    padding: 0 6px;
  }
}

/* 绑定会员模态框样式 */
.user-item {
  transition: background-color 0.2s ease;
}

.user-item:hover {
  background-color: #f5f5f5 !important;
}

.user-item.selected {
  background-color: #e6f7ff !important;
  border-left: 3px solid #1890ff;
}

.user-item:last-child {
  border-bottom: none !important;
}

/* 绑定会员按钮样式 */
.bind-user-button {
  color: #1890ff;
  border: none;
  padding: 0;
  height: auto;
  font-size: 12px;
}

.bind-user-button:hover {
  color: #40a9ff;
  background: none;
}

/* 用户搜索结果样式 */
.user-search-results {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
}

.user-search-results::-webkit-scrollbar {
  width: 6px;
}

.user-search-results::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.user-search-results::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.user-search-results::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 已选择用户样式 */
.selected-user-card {
  padding: 16px;
  background-color: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-user-info {
  flex: 1;
}

.selected-user-name {
  font-weight: 600;
  margin-bottom: 4px;
  color: #262626;
}

.selected-user-detail {
  color: #666;
  font-size: 13px;
  margin-bottom: 2px;
}

/* 用户头像样式 */
.user-avatar {
  background-color: #1890ff;
  color: white;
}

/* 搜索框样式 */
.user-search-input {
  margin-bottom: 16px;
}

.user-search-input .ant-input-search {
  border-radius: 6px;
}

.user-search-input .ant-btn {
  border-radius: 0 6px 6px 0;
}

/* 结账模态框样式 */
.checkout-modal .ant-form-item {
  margin-bottom: 20px;
}

.checkout-modal .ant-form-item-label {
  font-weight: 500;
  color: #262626;
}

/* 会员信息卡片样式 */
.member-info-card {
  padding: 12px;
  background-color: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-info-details {
  flex: 1;
}

.member-name {
  font-weight: 500;
  margin-bottom: 4px;
  color: #262626;
}

.member-balance {
  color: #666;
  font-size: 13px;
}

/* 结账预览样式 */
.checkout-preview {
  padding: 16px;
  background-color: #f5f5f5;
  border-radius: 6px;
  border: 1px solid #d9d9d9;
}

.checkout-preview-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  align-items: flex-start;
}

.checkout-preview-item:last-child {
  margin-bottom: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8e8e8;
  font-weight: bold;
}

.checkout-preview-deduction {
  color: #52c41a;
  text-align: right;
  flex: 1;
  margin-left: 12px;
}

.checkout-preview-deduction-detail {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.checkout-preview-total {
  color: #ff4d4f;
  font-size: 16px;
}

.checkout-preview-original {
  color: #262626;
  font-weight: 500;
}

.checkout-preview-total-deduction {
  color: #52c41a;
  font-weight: 600;
}

/* 支付方式样式 */
.payment-methods .ant-radio-group {
  width: 100%;
}

.payment-methods .ant-radio-wrapper {
  display: block;
  margin-bottom: 8px;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.payment-methods .ant-radio-wrapper:hover {
  border-color: #1890ff;
  background-color: #f0f8ff;
}

.payment-methods .ant-radio-wrapper-checked {
  border-color: #1890ff;
  background-color: #e6f7ff;
}

/* 会员选项样式 */
.member-options .ant-checkbox-wrapper {
  display: block;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.member-options .ant-checkbox-wrapper:hover {
  border-color: #1890ff;
  background-color: #f0f8ff;
}

.member-options .ant-checkbox-wrapper-checked {
  border-color: #1890ff;
  background-color: #e6f7ff;
}

/* 加载状态样式 */
.checkout-loading {
  text-align: center;
  padding: 20px;
}

.checkout-loading .ant-spin {
  color: #1890ff;
}

/* 打印选项样式 */
.print-options .ant-checkbox-wrapper {
  display: block;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  transition: all 0.2s ease;
  background-color: #f9f9f9;
}

.print-options .ant-checkbox-wrapper:hover {
  border-color: #1890ff;
  background-color: #f0f8ff;
}

.print-options .ant-checkbox-wrapper-checked {
  border-color: #1890ff;
  background-color: #e6f7ff;
}

.print-options .ant-checkbox {
  margin-right: 8px;
}

.print-options .ant-checkbox + span {
  color: #262626;
  font-weight: 500;
} 